﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %>

<%@ Register TagPrefix="CustomWC" Namespace="SDS.SharePoint.ReplaceDocument.WebControls" Assembly="$SharePoint.Project.AssemblyFullName$" %>

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Replace.aspx.cs" Inherits="SDS.SharePoint.ReplaceDocument.Layouts.SDS.SharePoint.ReplaceDocument.Replace" DynamicMasterPageFile="~masterurl/default.master" %>
    
<asp:content id="PageTitle" contentplaceholderid="PlaceHolderPageTitle" runat="server">
Replace Document
</asp:content>
<asp:content id="PageHead" contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
</asp:content>
<asp:content id="PageTitleInTitleArea" contentplaceholderid="PlaceHolderPageTitleInTitleArea" runat="server">
    <CustomWC:FileProperty runat="server" id="ID_FileProperty" ShowParentFolders="true" /> : Replace Document
</asp:content>
<asp:content id="Main" contentplaceholderid="PlaceHolderMain" runat="server">
    <% if (IsSolutionCatalog) { %>
        <br />
        <br />
        <br />
        Solution Galleries are NOT supported
	<% } else { %>
	    <table border="0" width="100%" cellspacing="0" cellpadding="0" class="ms-descriptiontext">
	        <wssuc:InputFormSection runat="server">
		        <Template_Title>
				        <SharePoint:EncodedLiteral ID="EncodedLiteral2" runat="server" text="<%$Resources:wss,upload_document_title%>" EncodeMethod='HtmlEncode'/>
		        </Template_Title>
		        <Template_Description>
			        <% if (IsPictureLibrary) { %>
				        <SharePoint:EncodedLiteral ID="EncodedLiteral3" runat="server" text="<%$Resources:wss,upload_picture_description%>" EncodeMethod='HtmlEncode'/>
			        <% } else { %>
				        <SharePoint:EncodedLiteral ID="EncodedLiteral5" runat="server" text="<%$Resources:wss,upload_document_description%>" EncodeMethod='HtmlEncode'/>
			        <% } %>
		        </Template_Description>
		        <Template_InputFormControls>
			            <wssuc:InputFormControl runat="server"  LabelText="<%$Resources:wss,multipages_Name%>" LabelAssociatedControlId="InputFile">
			                <Template_Control>
			                   <table class="ms-authoringcontrols" width="100%">
				                <tr><td>
					                 <span dir="ltr">
                            
						                <input type="file" id="InputFile" runat="server" class="ms-fileinput" size="35" />
					                 </span>
				                </td></tr>
				                <tr><td>
				                <SharePoint:InputFormRequiredFieldValidator ControlToValidate="InputFile"
					                Display="Dynamic" ErrorMessage="<%$Resources:wss,upload_document_file_missing%>" Runat="server"
					                BreakBefore="false" BreakAfter="false" />
				                <asp:CustomValidator ControlToValidate="InputFile"
					                Display = "Dynamic"
					                ErrorMessage = "<%$Resources:wss,upload_document_file_invalid%>"
					                OnServerValidate="ValidateFile"
					                runat="server"/>
				                <asp:CustomValidator ControlToValidate="InputFile"
					                Display = "Dynamic"
					                ErrorMessage = "The type of file being uploaded does not match the current file"
					                OnServerValidate="ValidateFileExtension"
					                runat="server"/>
				                </td></tr></table>
			                </Template_Control>
			            </wssuc:InputFormControl>
		        </Template_InputFormControls>
	        </wssuc:InputFormSection>
    
	        <wssuc:ButtonSection runat="server">
		        <Template_Buttons>
			        <input id="btnOK" runat="server" type="button" accesskey="<%$Resources:wss,multipages_okbutton_accesskey%>" class="ms-ButtonHeightWidth" value="<%$Resources:wss,multipages_okbutton_text%>" onserverclick="OnSubmit" />
		        </Template_Buttons>
	        </wssuc:ButtonSection>
	    </table>
	<% } %>
</asp:content>

